
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Controlador;

import Modelo.ModPartida;
import Modelo.Record;
import Modelo.Registrar;
import Vista.VRecord;
import Vista.VRegistrar;
import Vista.VistaMenu;
import Vista.VistaPart;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.sql.SQLException;
import bean.Music;
import java.io.File;
import javax.swing.WindowConstants;


/**
 *
 * @author USUARIO
 */
public class ContMenu{
    
    private VistaMenu V;
    
    

    public ContMenu(VistaMenu V) throws Exception {
        this.V = V;
        V.setVisible(true);
        
        
    }
    
    public void ActivarCampos(){
        V.setNivel(true);
        V.setIniP(true);
    }
    
    public void Salir(){
       System.exit(0);
    }
    
    public void ComenzarPartida() throws SQLException, Exception{
        
        ModPartida M = new ModPartida();
        VistaPart VP = new VistaPart();
        ContPartida C = new ContPartida(VP,M,this.V.getNivel().getSelectedIndex());
        VP.setControlador(C);
        
    }
    
    public void RegistrarFrase(){
        Registrar F = new Registrar();
        VRegistrar VR = new VRegistrar();
        ContRegistrar CR = new ContRegistrar(F,VR);
        VR.setControlador(CR);
        
    }

    public void MostrarRecords() throws SQLException {
        VRecord VRd = new VRecord();
        Record MRd = new Record();
        ContRecord CRd = new ContRecord(MRd,VRd);
        VRd.setVisible(true);
        VRd.setControlador(CRd);
    }

  
}
